enocean5 2.2.0
Loading...
Searching...
No Matches
main.c File Reference

EnOcean 5 Click example. More...

#include "board.h"
#include "log.h"
#include "enocean5.h"

Macros

#define DEMO_TEXT_MESSAGE_1   "MIKROE"
#define DEMO_TEXT_MESSAGE_2   "EnOcean 5"

Functions

void application_init (void)
void application_task (void)
int main (void)

Detailed Description

EnOcean 5 Click example.

Description

This example demonstrates radio communication betweeen two EnOcean 5 Click boards. The application performs a module reset, retrieves and logs device information, sends text-based radio telegrams, and waits for received ERP1 messages.

The demo application is composed of two sections :

Application Init

Initializes the logger and EnOcean 5 Click driver. Performs a hardware reset and reads module information including APP version, API version, and device identifiers.

Application Task

Sends "MIKROE" and "EnOcean 5" telegrams, waits for TX_DONE events, and listens for incoming ERP1 VLD telegrams, logging their content.

Author
Stefan Filipovic

Macro Definition Documentation

◆ DEMO_TEXT_MESSAGE_1

#define DEMO_TEXT_MESSAGE_1   "MIKROE"

◆ DEMO_TEXT_MESSAGE_2

#define DEMO_TEXT_MESSAGE_2   "EnOcean 5"

Function Documentation

◆ application_init()

void application_init ( void )

< Logger config object.

< Click config object.

Logger initialization. Default baud rate: 115200 Default log level: LOG_LEVEL_DEBUG

Note
If USB_UART_RX and USB_UART_TX are defined as HAL_PIN_NC, you will need to define them manually for log to work. See LOG_MAP_USB_UART macro definition for detailed explanation.

◆ application_task()

void application_task ( void )

◆ main()

int main ( void )